package cn.semcorp.zhuhaizj.exception;

import cn.semcorp.zhuhaizj.restful.ResponseCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 业务异常处理
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ServiceException extends RuntimeException{
    private ResponseCode responseCode;

    /**
     * 创建自定义异常
     * @param responseCode
     * @param message
     */
    public ServiceException(ResponseCode responseCode, String message) {
        super(message);
        setResponseCode(responseCode);
    }

}
